<!DOCTYPE HTML> 
<html> 
<head> 
<meta charset="utf-8"> 
<title></title> 
    <script src="jquery.js"></script>

</head>
<body>
<div class="demo-area">
  <button id="d_clip_button" class="my_clip_button" title="Click me to copy to clipboard." data-clipboard-target="fe_text" data-clipboard-text="Default clipboard text from attribute"><b>Copy To Clipboard...</b></button>
  <h4><label for="fe_text">Change Copy Text Here</label></h4>
  <textarea id="fe_text"  cols="50" rows="3">Copy me!</textarea>
</div>
<h4>Debug Console:</h4>
<div id="d_debug"></div>


<script type="text/javascript" src="ZeroClipboard.min.js"></script>
<script language="JavaScript">

$(document).ready(function() {
var clip = new ZeroClipboard($("#d_clip_button"), {
  moviePath: "ZeroClipboard.swf"
});

clip.on('load', function (client) {
  debugstr("Flash movie loaded and ready.");
});

clip.on('noFlash', function (client) {
  $(".demo-area").hide();
  debugstr("Your browser has no Flash.");
});

clip.on('wrongFlash', function (client, args) {
  $(".demo-area").hide();
  debugstr("Flash 10.0.0+ is required but you are running Flash " + args.flashVersion.replace(/,/g, "."));
});

clip.on('complete', function (client, args) {
  debugstr("Copied text to clipboard: " + args.text);
});

// jquery stuff (optional)
function debugstr(text) {
  $("#d_debug").append($("<p>").text(text));
}

});

</script>
</body>
</html>